xy_p_palm <- function (fil='xy.txt', nam='name') {
xy=read.csv(fil, header=F)
xy1=as.vector(xy, mode='numeric')
len=length(xy1)

x0=94
y0=44

x1_zeiss=-142.7
y1_zeiss=-15.3





if (xy1[1] < 70) {
y=xy1[seq(1,len,2)]-y0
x=xy1[seq(2,len,2)]-x0
}else {
x=xy1[seq(1,len,2)]-x0
y=xy1[seq(2,len,2)]-y0
}

trans=1000
x_zeiss=(x1_zeiss + x)* trans
y_zeiss=(y1_zeiss - y)* trans



xy_d=data.frame(x_zeiss,y_zeiss)

out_name=paste(nam, 'xys.txt', sep='.');
write.table(xy_d, out_name, sep='\t', quote=F)


xlim=c(-2,17)
lin=seq(xlim[1]+1, xlim[2]-1)

plot(NA, type='n', xlim=xlim, ylim=xlim, cex.axis=.5)
abline(h=lin, v=lin, col='gray')
lines(c(0, 15, 15, 0, 0), c(0, 0, 15, 15, 0))
points(x, y, xlim=xlim, ylim=xlim, asp=1, pch=16)


lenx=length(x)
xy_str="#, X, Y:"
for ( i in 1:lenx) {
xys=paste(i, x_zeiss[i], y_zeiss[i], sep=', ')
xy_str=paste(xy_str, xys, sep='\n')
}
text(x, y, 1:lenx, pos=4)
title(nam)

}



# plot (0 ,main = paste(strwrap("This is a really long title that
# i can not type it properly",width = 50 ) ,
# collapse = "\n"))